<template>
	<div>
		<second-nav :tid="Parent_tid" v-on:PchangeTid="changeTid"></second-nav>
		<router-view></router-view>
	</div>
</template>

<script>
	import secondNav from 'components/secondNav/secondNav'
	export default {
		name: "channel",
		components: {
			secondNav
		},
		data() {
			return {
				Parent_tid: this.$route.params.tid
			}
		},
		watch: {
			$route(newValue, oldValue) {
				if(newValue.path.indexOf("channel")) {
//					this.$store.commit("setCurTid",{
//						curTid:newValue.params.tid
//					})
					this.Parent_tid = newValue.params.tid
				}
			}
		},
		methods: {
			changeTid(tid) {
				//				tid来自于子组件的
				this.Parent_tid = tid
			},
		}
	}
</script>

<style>

</style>